package com.huawei.zyb.taskManager.infrastructure.persistence.po;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 任务持久化对象
 */
public class TaskPO {
    private Long id;
    private String title;
    private String description;
    private String status;
    private BigDecimal progress;
    private String priority;
    private String level;
    private String assigneeId;
    private Long requirementId;
    private Long parentTaskId;
    private BigDecimal estimatedHours;
    private BigDecimal actualHours;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    // 默认构造函数
    public TaskPO() {}

    // 全参构造函数
    public TaskPO(Long id, String title, String description, String status, 
                  BigDecimal progress, String priority, String level, 
                  String assigneeId, Long requirementId, Long parentTaskId,
                  BigDecimal estimatedHours, BigDecimal actualHours,
                  LocalDateTime createdAt, LocalDateTime updatedAt) {
        this.id = id;
        this.title = title;
        this.description = description;
        this.status = status;
        this.progress = progress;
        this.priority = priority;
        this.level = level;
        this.assigneeId = assigneeId;
        this.requirementId = requirementId;
        this.parentTaskId = parentTaskId;
        this.estimatedHours = estimatedHours;
        this.actualHours = actualHours;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigDecimal getProgress() {
        return progress;
    }

    public void setProgress(BigDecimal progress) {
        this.progress = progress;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getAssigneeId() {
        return assigneeId;
    }

    public void setAssigneeId(String assigneeId) {
        this.assigneeId = assigneeId;
    }

    public Long getRequirementId() {
        return requirementId;
    }

    public void setRequirementId(Long requirementId) {
        this.requirementId = requirementId;
    }

    public Long getParentTaskId() {
        return parentTaskId;
    }

    public void setParentTaskId(Long parentTaskId) {
        this.parentTaskId = parentTaskId;
    }

    public BigDecimal getEstimatedHours() {
        return estimatedHours;
    }

    public void setEstimatedHours(BigDecimal estimatedHours) {
        this.estimatedHours = estimatedHours;
    }

    public BigDecimal getActualHours() {
        return actualHours;
    }

    public void setActualHours(BigDecimal actualHours) {
        this.actualHours = actualHours;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        return "TaskPO{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", status='" + status + '\'' +
                ", progress=" + progress +
                ", priority='" + priority + '\'' +
                ", level='" + level + '\'' +
                ", assigneeId=" + assigneeId +
                ", requirementId=" + requirementId +
                ", parentTaskId=" + parentTaskId +
                "}";
    }
}